home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Creative Review 28
/
Creative-Review-CD-ROM-28.iso
/
pc
/
kungfu
/
assets
/
intro.dir
/
00122_Script_antipoll class
< prev
next >
Wrap
Text File
|
1997-08-08
|
2KB
|
93 lines
-- antipoll class
-- --------------------------------------------------
property obj
property folderpath
property xtraname
property disposeflag
-- ==================================================
-- new method
-- --------------------------------------------------
on new me, props
minit me, props
return me
end mnew
-- ==================================================
-- minit method
-- --------------------------------------------------
on minit me
put "in minit antipoll "
set platformseperator = "\"
set xtraname = "antipoll"
set folderpath = "xtra" & platformseperator
openxlib the moviepath & folderpath & xtraname
set obj = xronosKit ( mnew )
set disposeflag = false
put "out minit antipoll "
end minit
-- ==================================================
-- monekey poll method
-- --------------------------------------------------
on monekey me, thecode
return obj ( lKeyState, thecode )
end monekey
-- ==================================================
-- mgetallkeys poll method
-- --------------------------------------------------
on mgetallkeys
global gantipoll
set codeflag = false
set allkeys = []
repeat with loopcode = 0 to 256
set key = monekey (gantipoll, loopcode )
if key then
add allkeys, loopcode
end if
end repeat
return allkeys
end mgetallkeys
-- ==================================================
-- mdispose poll method
-- --------------------------------------------------
on mdispose me
put "in mdispose antipoll "
if not ( disposeflag ) then
set disposeflag = true
obj ( mdispose )
closexlib the moviepath & folderpath & xtraname
end if
put "out mdispose antipoll "
end mdispose